--// fat jet -- @darkceius -- love you bai bai --\\ --> Essentials local debris = game:GetService("Debris") local players = game:GetService("Players") local tween = game:GetService("TweenService") local runService = game:GetService("RunService") local brakes = false local maxAcceleration = 10000 local owner = owner --> Input script.Name = "Aircraft" local inputRemote = Instance.new("RemoteEvent") inputRemote.Parent = script inputRemote.Name = "input" local superSonic = 0 local holdingInputs = {['W']=true} local inputScript = NLS([[ local uis = game:GetService("UserInputService") local remote = script:WaitForChild("input") local holdings = {} function input(data, began) local keyCode = data.KeyCode if keyCode ~= Enum.KeyCode.Unknown then holdings[keyCode.Name] = began end remote:FireServer("inputHoldings", holdings, keyCode, began) end uis.InputBegan:Connect(function(data, bg) if bg then return end input(data, true) end) uis.InputEnded:Connect(function(data, bg) if bg then return end input(data, false) end) print"Client loaded" ]], owner.PlayerGui) inputRemote.Parent = inputScript --> Engine local engineStarted = false local velocity = Vector3.new(0,0,0) local cf = CFrame.new(0,3,0) local acceleration = 1 local seat = Instance.new("Seat", script) seat:SetNetworkOwner(nil) seat.Massless = true local Mesh = Instance.new("SpecialMesh") Mesh.Offset = Vector3.new(0, 10, 0) Mesh.Scale = Vector3.new(5, 5, 5) Mesh.MeshId = "rbxassetid://817784082" Mesh.TextureId = "rbxassetid://817784641" Mesh.MeshType = Enum.MeshType.FileMesh Mesh.Parent = seat local mainBox = seat local function newJetSound(soundId, props) props = props or {} local s = Instance.new("Sound", seat) s.RollOffMaxDistance = 5000 s.RollOffMinDistance = 5 s.SoundId = soundId for i,v in pairs(props) do s[i]=v end return s end local engineStart = newJetSound("rbxassetid://8678491466") engineStart.Volume = 4 local boom = newJetSound("rbxassetid://9114631260") boom.Volume = 7 boom.PlaybackSpeed = 1 local boom2 = newJetSound("rbxassetid://9116377205") boom2.Volume = 4 boom2.PlaybackSpeed = 1 --9114631053 local horn = newJetSound("rbxassetid://291315892") horn.Volume = 1 --291315892 if owner.Character then local char = owner.Character if char:FindFirstChild("HumanoidRootPart") then seat.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 4, -4) cf = seat.CFrame end end function stopEngine(new) if engineStarted == false and new ~= true then return end engineStarted = false brakes = false acceleration = 0 seat.Anchored = false seat.CanCollide = true print("Stopping engine!") engineStart:Stop() end function startEngine() if engineStarted == true then return end engineStart:Play() engineStarted = true seat.Anchored = true acceleration = 0 brakes = false seat.CanCollide = false print("Starting engine!") end seat:GetPropertyChangedSignal("Occupant"):Connect(function() local humanoid = seat.Occupant if humanoid then local char = owner.Character if humanoid.Parent == char then startEngine() else print("Occupant isnt owner") seat.Occupant = nil end else stopEngine() end end) stopEngine(true) task.spawn(function() local lastPing = tick() if seat:GetNetworkOwner() ~= nil and seat:CanSetNetworkOwnership() then seat:SetNetworkOwner(nil) end game:GetService("RunService").Stepped:Connect(function() if engineStarted then local x, y, z = 0, 0, 0 local orientationX, orientationY, orientationZ = 0, 0, 0 local didSuper = (tick()-superSonic) <= 3 if holdingInputs["W"] then acceleration = math.clamp(acceleration + 0.1* (didSuper and 10 or 1), 0, maxAcceleration) else acceleration = math.clamp(acceleration -( 0.1* (brakes and (acceleration > 1000 and 20 or 8) or 0 )), 0, maxAcceleration) end --if holdingInputs["W"] then -- orientationX -= math.rad(35*(acceleration)) --end if holdingInputs["S"] then orientationX =orientationX+ math.rad(15*(math.clamp(acceleration, 0, 50))) end if holdingInputs["D"] then orientationY =orientationY- math.rad(15*(math.clamp(acceleration, 0, 45))) end if holdingInputs["A"] then orientationY =orientationY+ math.rad(15*(math.clamp(acceleration, 0, 45))) end if holdingInputs["Q"] then orientationZ =orientationZ+ math.rad(25*(math.clamp(acceleration, 0, 70))) end if holdingInputs["E"] then orientationZ =orientationZ+ math.rad(-25*(math.clamp(acceleration, 0, 70))) end brakes = holdingInputs["Z"] z = (-0.5)*acceleration velocity = CFrame.new(x, y, z) cf = velocity local result = (cf * CFrame.Angles(math.rad(orientationX), math.rad(orientationY), math.rad(orientationZ))) local b = mainBox.CFrame * result mainBox.CFrame = mainBox.CFrame:Lerp(b, .1) end end) end) inputRemote.OnServerEvent:Connect(function(plr, arg, ...) if plr ~= owner then return end if arg == "inputHoldings" then local holdings, keyPressed, began = ... holdingInputs = holdings if began and engineStarted then if keyPressed == Enum.KeyCode.H then horn:Play() end if keyPressed == Enum.KeyCode.X then boom:Play() boom2:Play() superSonic = tick() end end end end) warn("---~ Darkceius Jet ~---") print("H - Horn") print("X - Sonic Boom Boost") print("WASD - Controls") print("Z - Brakes") print("Q E - Rotate") warn(string.rep("-", 23))